#ifndef LASERHELPER_H
#define LASERHELPER_H

#include "src/pubimp.h"
#include "../modbusControl/mbControl.h"
#include "tools.h"
#include "MU_API.h"
#include "src/SoftWare/DateTime/DateTime.h"
#include <future>


class LaserHelper
{
public:


    static LaserHelper* GetInstance(){
        static QMutex mutex;
        static QScopedPointer<LaserHelper> inst;
        if (Q_UNLIKELY(!inst)) {
            mutex.lock();
            if (!inst) {
                inst.reset(new LaserHelper);
            }
            mutex.unlock();
        }
        return inst.data();
    }

    void Connect();

    MU_RETURNS Open();
    MU_RETURNS Close();
    void handlerDis();
private:
    LaserHelper();
    /// 激光
    std::shared_ptr<mbControl> _mb_ptr;///电机指针
    MU_RETURNS _connect();
};

#endif // LASERHELPER_H
